<?php
/**
 * Joomla! 1.5 component ArticleCashRewards
 *
 * @version $Id: view.html.php 2009-05-10 01:47:01 svn $
 * @author Maverick
 * @package views.config
 * @subpackage ArticleCashRewards
 * @license GNU/GPL
 * Website: http://www.boddunan.com
 *
 * Review and approve the articles and assign points and cash rewards.
 * Users can see their articles and the points/cash rewards assigned in the front-end module.
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

// Import Joomla! libraries
jimport( 'joomla.application.component.view');
class ArticleCashRewardsViewConfig extends JView {
	
    function display($tpl = null) {

        global $mainframe,$acr_config;
		JToolBarHelper::title("&nbsp;&nbsp;&nbsp;&nbsp;" . JText::_('ArticleCashRewards').': <small><small>[ ' . JText::_('CPANEL_CONFIG') .' ]</small></small>', 'acr-48.png');
		JToolBarHelper::custom('cpanel', 'default.png', 'default.png', JText::_('TITLE_CPANEL'), false);    
		JToolBarHelper::save();
		JToolBarHelper::preferences('com_articlecashrewards', '250');

		$params 	= JComponentHelper::getParams('com_articlecashrewards');

        $model = & $this->getModel('config');
        $configt = $model->getConfiguration();
        foreach($configt as $ct){
            $acr_config[$ct->config_name] = $ct->config_value;
        }
        $mainframe->setUserState( SESSION_ACR_CONFIG, $acr_config );
        
		$this->assignRef('params', $params);
		$this->assignRef('list', $list);
		$this->assignRef('acr_config', $acr_config);
      
		parent::display($tpl);
    }
}
?>